package cn.com.taiji.oospub.wechat.service.impl;

import cn.com.taiji.oospub.wechat.entity.OrderComment;
import cn.com.taiji.oospub.wechat.mapper.OrderCommentMapper;
import cn.com.taiji.oospub.wechat.service.IOrderCommentService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 订单评价表 服务实现类
 * </p>
 *
 * @author 
 * @since 2020-11-30
 */
@Service
public class OrderCommentServiceImpl extends ServiceImpl<OrderCommentMapper, OrderComment> implements IOrderCommentService {

    @Autowired
    private OrderCommentMapper orderCommentMapper;

    @Override
    public OrderComment getByorderId(String orderId) {
        QueryWrapper<OrderComment> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_id",orderId);
        return orderCommentMapper.selectOne(queryWrapper);
    }
}
